package com.ihome.android.annotation;

import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.ScaleAnimation;

public class LauncherItemScaleAnim {
	private long mDurationMillis;
	private float mFromX;
	private float mToX;
	private float mFromY;
	private float mToY;

	public Animation getAnimation() {
		ScaleAnimation localScaleAnimation = new ScaleAnimation(mFromX, mToX,
				mFromY, mToY, Animation.RELATIVE_TO_SELF, 0.5F, Animation.RELATIVE_TO_SELF, 0.5F);
		localScaleAnimation.setFillAfter(true);
		localScaleAnimation.setInterpolator(new DecelerateInterpolator());
		localScaleAnimation.setDuration(mDurationMillis);
		return localScaleAnimation;
	}

	public void setParams(float fromX, float toX, float fromY, float toY,
			long durationMillis) {
		this.mFromX = fromX;
		this.mToX = toX;
		this.mFromY = fromY;
		this.mToY = toY;
		this.mDurationMillis = durationMillis;
	}
}
